package com.xiebishe.mylibrary.common.pageStatus.topHandler;

import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;

import com.xiebishe.mylibrary.common.pageStatus.centerHandler.NormalStatusHandler;

public abstract class TopStatusHandler<VIEW extends ViewGroup> extends NormalStatusHandler<VIEW> {
    private final int centerInTopPx;

    public TopStatusHandler(@NonNull VIEW layout, int centerInTopPx) {
        super(layout);
        this.centerInTopPx = centerInTopPx;
    }

    @Override
    protected final void addToLayout(@NonNull View view, @NonNull VIEW layout) {
        addToTop(view, layout, centerInTopPx);
    }

    protected abstract void addToTop(@NonNull View view, @NonNull VIEW layout, int centerInTopPx);

}
